package modelo;
// default package
// Generated 25/10/2014 15:59:58 by Hibernate Tools 3.4.0.CR1

import java.util.HashSet;
import java.util.Set;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.JoinTable;
import javax.persistence.ManyToMany;
import javax.persistence.Table;

/**
 * Tipoevento generated by hbm2java
 */
@Entity
@Table(name = "tipoevento", catalog = "eventos_compartidos")
public class Tipoevento implements java.io.Serializable {

	private Integer idTipoEvento;
	private String nombreTipoEvento;
	private Set<Salon> salons = new HashSet<Salon>(0);

	public Tipoevento() {
	}

	public Tipoevento(String nombreTipoEvento) {
		this.nombreTipoEvento = nombreTipoEvento;
	}

	public Tipoevento(String nombreTipoEvento, Set<Salon> salons) {
		this.nombreTipoEvento = nombreTipoEvento;
		this.salons = salons;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "idTipoEvento", unique = true, nullable = false)
	public Integer getIdTipoEvento() {
		return this.idTipoEvento;
	}

	public void setIdTipoEvento(Integer idTipoEvento) {
		this.idTipoEvento = idTipoEvento;
	}

	@Column(name = "nombreTipoEvento", nullable = false, length = 50)
	public String getNombreTipoEvento() {
		return this.nombreTipoEvento;
	}

	public void setNombreTipoEvento(String nombreTipoEvento) {
		this.nombreTipoEvento = nombreTipoEvento;
	}

	@ManyToMany(fetch = FetchType.LAZY)
	@JoinTable(name = "tipoeventoxsalon", catalog = "eventos_compartidos", joinColumns = { @JoinColumn(name = "idTipoEvento", nullable = false, updatable = false) }, inverseJoinColumns = { @JoinColumn(name = "idSalon", nullable = false, updatable = false) })
	public Set<Salon> getSalons() {
		return this.salons;
	}

	public void setSalons(Set<Salon> salons) {
		this.salons = salons;
	}

}
